import { getPlatform } from '@tencentcloud/universal-api';

declare const uni: any;

// console.log(getPlatform())

// export const isPC = getPlatform() === 'pc';

// export const isH5 = getPlatform() === 'h5';

export const isWeChat = getPlatform() === 'wechat';

export const isApp = getPlatform() === 'app';

export const isUniFrameWork = typeof uni !== 'undefined';

// export const isMobile = isH5 || isWeChat || isApp;
function isPhone(): boolean {
    const ua = navigator.userAgent.toLowerCase();
    return /android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(ua);
}

export const isPC = !isPhone();

export const isH5 = isPhone();


export const isMobile = isH5 || isWeChat || isApp;
